<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrgList.aspx.cs" Inherits="PayRoller.Manage.OrgInfo.OrgList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Huayou.Common" Namespace="Huayou.UI.WebControls" TagPrefix="cc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css.css" type="text/css" rel="stylesheet">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script language="javascript" src="../../js/jslib.js" type="text/javascript"></script>
</head>
<body topmargin="0" leftmargin="0">
    <form id="form1" runat="server">
    <div>
        <table width="99%" align="center" border="0" cellspacing="0" cellpadding="0" class="NormalText">
            <tr>
                <td colspan="2" align="left" style="height: 40px" class="HeadText">
                    Client Details
                </td>
                <td align="left" style="height: 24px">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td align="left" style="height: 24px">
                    Client Name:
                </td>
                <td align="left" style="height: 24px">
                    &nbsp;<asp:TextBox ID="txtOrgName" runat="server"></asp:TextBox>
                </td>
                <td align="left" style="height: 24px">
                    &nbsp;Client ABN/ACN:<asp:TextBox ID="txtABN" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left" style="height: 24px">
                    Client reference number:
                </td>
                <td align="left" style="height: 24px">
                    &nbsp;<asp:TextBox ID="txtSid" runat="server"></asp:TextBox>
                </td>
                <td style="height: 24px" align="center">
                    &nbsp;
                    <asp:Button ID="bnSearch" runat="server" OnClick="bnSearch_Click" Text="Search" CssClass="submitBtn" />
                </td>
            </tr>
            <tr>
                <td height="22" align="center" colspan="3">
                    <cc1:DataGridTable CellPadding="1" CellSpacing="1" BackColor="#cccccc" Width="100%"
                        ID="dgdList" runat="server" BorderWidth="0px" BorderStyle="None" IsAllowPaging="True"
                        PageSize="12" OnDataBinding="dgdList_DataBinding" OnPageIndexChanged="dgdList_PageIndexChanged"
                        AutoGenerateColumns="False" CssClass="tableGrid" MaxRecord="0" PageCSS="scrollButton"
                        OnItemDataBound="dgdList_ItemDataBound">
                        <PagerStyle CssClass="gridPager" BackColor="White" />
                        <SelectedItemStyle CssClass="gridSelectedItem" />
                        <ItemStyle Height="25px" CssClass="gridItem" BackColor="White"></ItemStyle>
                        <HeaderStyle Height="22px" CssClass="right-ta-ti01" Font-Bold="True"></HeaderStyle>
                        <AlternatingItemStyle CssClass="gridAltItem" />
                        <FooterStyle CssClass="gridFooter" BackColor="White" />
                        <EditItemStyle CssClass="gridEditItem" />
                        <Columns>
                            <asp:BoundColumn DataField="Sid" HeaderText="Sid"></asp:BoundColumn>
                            <asp:BoundColumn DataField="AgreementDate" HeaderText="Register Date" DataFormatString="{0:dd/MM/yyyy HH:mm }">
                            </asp:BoundColumn>
                            <asp:TemplateColumn HeaderText="Customer Name">
                                <ItemTemplate>
                                    <a href="Index.aspx?OrgSid=<%# Eval("Sid")%>">
                                        <%# Eval("OrgName")%></a>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:BoundColumn DataField="UserName" HeaderText="UserName"></asp:BoundColumn>
                            <asp:BoundColumn DataField="PassWord" HeaderText="PassWord"></asp:BoundColumn>
                            <asp:BoundColumn DataField="IsValid" HeaderText="IsValid"></asp:BoundColumn>
                            <asp:TemplateColumn HeaderText="Operate">
                                <ItemTemplate>
                                    <%# (Convert.ToInt32(Eval("IsValid")) == 1) ? "<a href=OrgOperate.aspx?OrgSid=" + Eval("Sid") + "&act=0>Cancel</a>" : "<a href=OrgOperate.aspx?OrgSid=" + Eval("Sid") + "&act=1>Approve</a>"%>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn HeaderText="Delete">
                                <ItemTemplate>
                                    <a href="OrgDel.aspx?OrgSid=<%# Eval("Sid")%>" onclick="return confirm('Really Delete It?');">
                                        Delete</a>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn HeaderText="InvoiceStatus">
                                <ItemTemplate>
                                    <asp:Literal ID="litInvoiceStatus" runat="server"></asp:Literal>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                        </Columns>
                    </cc1:DataGridTable>
                </td>
            </tr>
            <tr>
                <td align="left">
                    &nbsp;
                </td>
                <td align="left">
                    &nbsp;
                </td>
                <td align="left">
                    <asp:TextBox ID="txtParamstr" runat="server" Visible="False" Width="48px"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
